package statemode;

/**
 * @author: zh
 * @date: 2021/12/17 21:50
 * @version: 1.0
 */
public class Zh0202DeadState extends Zh0202State {
    public Zh0202DeadState(Zh0202State state) {
        this.blood = state.blood;
        this.player = state.player;
    }

    @Override
    public void startGame() {
        super.startGame();
    }

    @Override
    public void waiting() {
        super.waiting();
    }

    @Override
    public void checkState() {
        if (isReady){
            player.setState(new Zh0202NormalState(this));
            System.out.println("成功进入游戏！");
        }
    }

    @Override
    public String toString() {
        return "Zh0202DeadState{" +
                "blood=" + blood +
                '}';
    }
}
